package com.swpu.project.strategy;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.swpu.project.strategy.searchimpl.FilterConTextForNative;
import com.swpu.project.strategy.searchimpl.FilterContextForSec;
import com.swpu.project.util.XlxsDataType;

import java.util.Map;

public interface FilterContext<T> {


    static public FilterContext getConText(XlxsDataType xlxsDataType) {
        switch (xlxsDataType) {
            case NATIVE:
                return new FilterConTextForNative();

            case SECONDARY:
                return new FilterContextForSec();


        }

        return null;
    }


    public LambdaQueryWrapper<T> makeFilterCondtion(LambdaQueryWrapper<T> lambdaQueryWrapper, Map<String, String> filterCondtions);


}
